<html>
    <head>
        <title>原型对象</title>
        <script type="text/javascript">
            function MyClass()
            {

            }

            //原型对象相当于一个类的公共区域，类似于C#中父类，子类中没有找到时，会从原型对象中查找
            MyClass.prototype.a = 123;

            var mc = new MyClass();
            console.log(mc.a);

            function Person(name, age, gender)
            {
                this.name = name;
                this.age = age;
                this.gender = gender;
            }

            Person.prototype.toString = function()
            {
                return "你是个哈儿呦";
            }
            var per = new Person("wilde", 28, "男");
            console.log(per);
        </script>
    </head>

    <body>

    </body>
</html>